<!--
 * @Description: 选择出库
 * @Autor: 商晓彬
 * @Date: 2021-09-02 17:24:36
 * @LastEditors: 商晓彬
 * @LastEditTime: 2021-12-27 09:12:56
-->
<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="son modal fade" tabindex="-1" role="dialog"
    aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div style="width:1881px!important;margin: 1.75rem auto;">
        <div class="modal-content">
            <form style="height: 890px!important;overflow: auto;" *ngIf="active" #bopForm="ngForm" novalidate
                (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>{{title}}</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')"
                        [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="row align-items-center" style="margin-top: 25px;">
                        <div class="primeng-datatable-container">
                            <p-table #dataTable [value]="primengTableHelper.records" (onLazyLoad)="getTableList($event)"
                                rows="{{primengTableHelper.defaultRecordsCountPerPage}}" [paginator]="false"
                                [lazy]="true" [scrollable]="true" ScrollWidth="100%"
                                [responsive]="primengTableHelper.isResponsive"
                                [resizableColumns]="primengTableHelper.resizableColumns" [(selection)]="selectRow">
                                <ng-template pTemplate="header" selectionMode="multiple">
                                    <tr>
                                        <th style="width: 50px" *ngIf="title != '出库查看' || title != '退库查看' ">
                                            选择
                                        </th>
                                        <th style="width: 50px">序号</th>
                                        <th style="width: 150px">仓库名称</th>
                                        <th style="width: 150px">产品图号</th>
                                        <th style="width: 150px">产品名称</th>
                                        <th style="width: 150px">规格型号</th>
                                        <th style="width: 150px">物料类别</th>
                                        <th style="width: 150px">物料细类</th>
                                        <th style="width: 150px">物料属性</th>
                                        <th style="width: 150px">合格证号</th>
                                        <th style="width: 150px">放行单号</th>
                                        <th style="width: 150px">质控卡号</th>
                                        <th style="width: 150px">型号(产品代号)</th>
                                        <th style="width: 150px">发次</th>
                                        <th style="width: 150px">批次</th>
                                        <th style="width: 150px">合格证任务号</th>
                                        <th style="width: 150px">装配任务号</th>
                                        <!-- <th style="width: 150px">数量</th> -->
                                        <th style="width: 150px">产品编号(件号)</th>
                                        <th style="width: 150px">有效期止</th>
                                        <th style="width: 150px">入库人</th>
                                        <th style="width: 150px">入库时间</th>
                                        <th style="width: 150px">备注</th>
                                        <th style="width: 150px">确认人</th>
                                        <th style="width: 150px">确认时间</th>
                                    </tr>
                                </ng-template>
                                <ng-template pTemplate="body" let-record="$implicit" let-rowIndex="rowIndex">
                                    <tr>
                                        <td style="width: 50px" *ngIf="title != '出库查看' || title != '退库查看'">
                                            <p-tableCheckbox [disabled]="!record.loadCheck" [value]="record"></p-tableCheckbox>
                                        </td>
                                        <td style="width: 50px">{{rowIndex+1}}</td>
                                        <td style="width: 150px">{{record.stroeName}}</td>
                                        <td style="width: 150px">{{record.productDrawingNo}}</td>
                                        <td style="width: 150px">{{record.productName}}</td>
                                        <td style="width: 150px">{{record.module}}</td>
                                        <td style="width: 150px">{{record.materialTypeName}}</td>
                                        <td style="width: 150px">{{record.materialCategoryName }}</td>
                                        <td style="width: 150px">{{record.outboundStatesDesc }}</td>
                                        <td style="width: 150px">{{record.qualifiedNumber }}</td>
                                        <td style="width: 150px">{{record.releaseOrder }}</td>
                                        <td style="width: 150px">{{record.qCCardNo }}</td>
                                        <td style="width: 150px">{{record.productCode }}</td>
                                        <td style="width: 150px">{{record.sendTime }}</td>
                                        <td style="width: 150px">{{record.batch }}</td>
                                        <td style="width: 150px">{{record.qualifiedTaskNumber }}</td>
                                        <td style="width: 150px">{{record.assemblyTaskNumber }}</td>
                                        <!-- <td style="width: 150px">{{record.quantity }}</td> -->
                                        <td style="width: 150px">{{record.productNumber }}</td>
                                        <td style="width: 150px">{{record.expirationDate  | momentFormat:'YYYY-MM-DD '}}</td>
                                        <td style="width: 150px">{{record.storePutPeopleDesc }}</td>
                                        <td style="width: 150px">{{record.storePutTime | momentFormat:'YYYY-MM-DD '}}</td>
                                        <td style="width: 150px">{{record.remark }}</td>
                                        <td style="width: 150px">{{record.identifyingPeople }}</td>
                                        <td style="width: 150px">{{record.IdentifyingTime | momentFormat:'YYYY-MM-DD ' }}</td>
                                    </tr>
                                </ng-template>
                            </p-table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer" style="justify-content: center;" *ngIf="title != '出库查看' && title != '退库查看'">
                    <button type="submit" class="btn btn-primary" [buttonBusy]="saving"
                        [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>选择</span></button>
                </div>
            </form>
        </div>
    </div>

</div>